<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Administrator's Login</title>
<link href="{{asset('assets/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet">
<!--[if lt IE 9]>
  <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="{{asset('assets/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
<link href="{{asset('assets/css/animate.css')}}" rel="stylesheet">
<link href="{{asset('assets/css/style.css')}}" rel="stylesheet">
<link href="{{asset('assets/css/app.css')}}" rel="stylesheet">
<body class="gray-bg">
	<div class="middle-box">
		<h1 class="logo-name text-center">登陆</h1>
		<form id="formLogin" class="m-t" role="form" method="post">
			<div class="form-group">
				<input name="username" class="form-control" placeholder="用户名" required="">
			</div>
			<div class="form-group">
				<input type="password" name="password" class="form-control" placeholder="密码" required="">
			</div>
			<button class="btn btn-primary block full-width" type="submit" class="btn btn-primary">登录</button>
		</form>
		<p class="text-center m-t">
			<small>内容管理系统cms_laravel &copy; 2016</small>
		</p>
	</div>
	<!-- Full screen mask -->
	<div id="loadingMask" class="loading" aria-label="Loading" tabindex="-1"></div>
	<script src="{{asset('assets/js/jquery-1.10.2.js')}}"></script>
	<script src="{{asset('assets/bootstrap/js/bootstrap.min.js')}}"></script>
	<!-- artDialog & artTemplate -->
	<script src="{{asset('assets/artDialog/dist/dialog-plus-min.js')}}"></script>
	<link href="{{asset('/assets/artDialog/css/ui-dialog.min.css')}}" rel="stylesheet" type="text/css">
	<script src="{{asset('assets/controllers/util.js')}}"></script>
	<script src="{{asset('assets/models/userModel.js')}}"></script>
	<script>
		$("#formLogin").on("submit", function(){
			var that = this;
			$(this).find(":submit").attr("disabled", "disabled");
			var formdata = $(this).serialize();
			userModel.login(formdata, function(result){
				window.location.reload();
			}, function(result){
				$(that).find(":submit").removeAttr("disabled");
				failure(result);
			});
			return false;
		});
	</script>
</body>
</html>